package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();//获取主线程
        System.out.println(main);
        doSome();
    }
    public static void doSome(){
        Thread t =Thread . currentThread();//获取的是调用doSome方法的线程
        System.out.println("运行doSome方法的线程"+t.getName());
    }
}